document.addEventListener('DOMContentLoaded', (event) => {
    const dialog = document.getElementById('dialog');
    const openBtn = document.getElementById('openBtn');
    const closeBtn = document.getElementById('closeBtn');

    // var dialog = $("#dialog")
    // var openBtn = $("#openBtn")
    // var closeBtn = $("closeBtn")

    openBtn.addEventListener('click', () => {
        dialog.style.display = 'block';
    });

    closeBtn.addEventListener('click', () => {
        dialog.style.display = 'none';
    });
    const dialog_wrap = document.querySelector('.dialog-wrap');
    if (dialog_wrap) {
        dialog_wrap.addEventListener('click', () => {
            dialog.style.display = 'none';
        });
    }

    const dialogContent = document.querySelector('.dialog-content');
    if (dialogContent) {
        dialogContent.addEventListener('click', (event) => {
            event.stopPropagation();
        });
    }
});
